﻿package java_45;

import java.util.Scanner;

public class code091 {
	public static void main(String[] args) {
		int[] score = new int[4];
		int classNum=3;
		double sum = 0.0;
		double average=0.0;
		Scanner input = new Scanner(System.in);
		for (int i = 0; i < classNum; i++) {
			sum=0.0f;
			System.out.println("请输入第"+(i+1)+"个班的成绩");

			for (int j = 0; j < score.length; j++) {
				System.out.println("第"+(j+1)+"的学员成绩");
				score[j]=input.nextInt();
				sum=sum+score[j];
			}

			average=sum/score.length;
			System.out.println("第"+(i+1)+"个班级参赛的平均分"+average+"\n");
		}
	}
}
